/*
Afisati pe ecranul 1602 ultimul buton apasat (K1-K5).
Trebuie sa adaugati in cadrul proiectului toate fisierele incluse in acest dosar (lcd.h si lcd.c);
*/
#include<reg51.h>	
#include"lcd.h"

sbit K1 = P1^4;
sbit K2 = P1^5;
sbit K3 = P1^6;
sbit K4 = P1^7;
sbit K5 = P3^5;



unsigned char PuZh[]=" Optimus Digital ";
unsigned char Key_Value[] ="Key_Value:";


void main(void)
{
	P1 &= 0xf0;					
	InitLcd1602();				
	LcdShowStr(0,0,PuZh);		
	LcdShowStr(0,1,Key_Value);
	while(1)
	{
		if(K1 == 0)
		{
			LcdShowStr(10,1,"K1");	
		}

		if(K2 == 0)
		{
			LcdShowStr(10,1,"K2");	
		}

		if(K3 == 0)
		{
			LcdShowStr(10,1,"K3");	
		}

		if(K4 == 0)
		{
			LcdShowStr(10,1,"K4");	
		}

		if(K5 == 0)
		{
			LcdShowStr(10,1,"K5");	
		}
	}			
}